<template>
  <div class="sidebar">
    <!-- 客户端下载区域 -->
    <div class="sidebar-section client-download">
      <div class="section-header">
        <span class="new-tag">NEW</span>
        <h4 class="section-title">下载客户端</h4>
      </div>
      <div class="client-screenshots">
        <div class="screenshot desktop">🖥️</div>
        <div class="screenshot mobile">📱</div>
        <div class="screenshot tablet">📱</div>
      </div>
      <button class="download-btn">
        <span class="download-icon">⬇️</span>
        下载客户端
      </button>
      <p class="platforms">PC 安卓 iPhone WP iPad Mac 六大客户端</p>
    </div>
    
    <!-- VIP服务区域 -->
    <div class="sidebar-section vip-service">
      <h4 class="section-title">黑胶VIP</h4>
      <p class="vip-desc">立享超21项专属特权</p>
      <button class="vip-btn">优惠购买</button>
    </div>
    
    <!-- 登录注册区域 -->
    <div class="sidebar-section login-section">
      <p class="login-desc">登录后可以无限收藏音乐，无缝同步到手机</p>
      <button class="login-btn">用户登录</button>
    </div>
    
    <!-- 入驻歌手区域 -->
    <div class="sidebar-section resident-singers">
      <div class="section-header">
        <h4 class="section-title">入驻歌手</h4>
        <a href="#" class="view-all">查看全部 ></a>
      </div>
      <div class="singers-list">
        <div class="singer-item" v-for="singer in singers" :key="singer.id">
          <img :src="singer.avatar" :alt="singer.name" class="singer-avatar">
          <div class="singer-info">
            <h5 class="singer-name">{{ singer.name }}</h5>
            <p class="singer-desc">{{ singer.description }}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Sidebar',
  data() {
    return {
      singers: [
        {
          id: 1,
          name: '张惠妹aMEI',
          description: '台湾歌手张惠妹',
          avatar: 'https://via.placeholder.com/50x50/ff6b6b/fff?text=张'
        },
        {
          id: 2,
          name: '吴莫愁Momo',
          description: '《中国好声音》选...',
          avatar: 'https://via.placeholder.com/50x50/4ecdc4/fff?text=吴'
        },
        {
          id: 3,
          name: '孙楠',
          description: '歌手孙楠 代表作《...',
          avatar: 'https://via.placeholder.com/50x50/45b7d1/fff?text=孙'
        },
        {
          id: 4,
          name: '麦田老狼',
          description: '歌手,音乐人。代...',
          avatar: 'https://via.placeholder.com/50x50/96ceb4/fff?text=麦'
        }
      ]
    }
  }
}
</script>

<style scoped>
.sidebar {
  width: 300px;
  padding: 20px;
}

.sidebar-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.new-tag {
  background: #ff6b6b;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.section-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  color: #333;
}

.view-all {
  color: #666;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.view-all:hover {
  color: #c20c0c;
}

/* 客户端下载区域 */
.client-screenshots {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

.screenshot {
  font-size: 40px;
  text-align: center;
}

.screenshot.desktop {
  font-size: 50px;
}

.download-btn {
  width: 100%;
  background: #1890ff;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.download-btn:hover {
  background: #096dd9;
}

.download-icon {
  font-size: 16px;
}

.platforms {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin: 10px 0 0 0;
}

/* VIP服务区域 */
.vip-desc {
  color: #666;
  font-size: 12px;
  margin: 10px 0 15px 0;
}

.vip-btn {
  background: #c20c0c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.vip-btn:hover {
  background: #a40011;
}

/* 登录区域 */
.login-desc {
  color: #666;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 15px 0;
}

.login-btn {
  width: 100%;
  background: #c20c0c;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-btn:hover {
  background: #a40011;
}

/* 入驻歌手区域 */
.singers-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.singer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.singer-item:hover {
  background: #f5f5f5;
}

.singer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.singer-info {
  flex: 1;
}

.singer-name {
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 5px 0;
  color: #333;
}

.singer-desc {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    padding: 10px;
  }
  
  .client-screenshots {
    justify-content: center;
    gap: 20px;
  }
}
</style>
